********************************************************************************
********************************************************************************

/*


 		Replication Do-File for the Article "Political Participation of Young 
		Immigrants: Do National Identification and Discrimination Moderate 
		the Relationship?"


 		Authors: Philipp Hoffmann & Verena Benoit 
		University of Bamberg 

		Correspondence: Philipp Hoffmann (philipp.hoffmann@uni-bamberg.de)


		All mistakes are the fault of the authors. We apologize for any mistakes. 




Some necessary information before running this Do-File: 
To successfully run this Do-File, you need data from the project "Children of 
Immigrants Longitudinal Survey in Four European Countries - Germany 
(CILS4EU-DE)".  


You can find the data via "https://search.gesis.org/research_data/ZA6656". 


We use the German part of CILS4EU with a focus on wave 5, as it contains the 
necessary variables for political participation. In addition, we use wave 1 
(e.g. for income of the parents) and wave 3 (e.g. for political interest). 
Therefore, you need to have access to waves 1-5 to successfully replicate and 
run this Do-File. 


We use both ZA5656 Version 3-3-0 and ZA6656 Version 3-3-0. 




*/
********************************************************************************
********************************************************************************














********************************************************************************


** Merging datasets 


********************************************************************************








*** Set up the working environment
clear 
set more off


*** Set up working directory 
cd " insert working directory "





********************************************************************************

** Start of Merging datasets

********************************************************************************

use w1_ym_ge_v1.2.0_rv.dta, clear 




********************Merge with w1_p_ge_v1.2.0_rv********************************

merge 1:1 youthid country using w1_p_ge_v1.2.0_rv.dta
keep if _merge == 3
drop _merge



********************Merge with w1_ya_ge_v1.2.0_rv.dta***************************

merge 1:1 youthid country using w1_ya_ge_v1.2.0_rv.dta
keep if _merge == 3
drop _merge




********************Merge with w3_ym_ge_v3.3.0_rv.dta***************************

merge 1:1 youthid country using w3_ym_ge_v3.3.0_rv.dta
keep if _merge == 3
drop _merge 




********************Merge with w5_ym_ge_v7.0.0_rv.dta***************************

merge 1:1 youthid country using w5_ym_ge_v7.0.0_rv.dta 
keep if _merge == 3
drop _merge








******************save Dataset**************************************************
	
	
save "Dataset_Youth Immigrants and Political Participation.dta"	
	
	
clear



















********************************************************************************



**						Data & Variable Management



********************************************************************************	

clear 

	
	
	
*** Set up working directory 
cd " insert working directory here "
	

*** Loading Dataset 
use "Dataset_Youth Immigrants and Political Participation.dta"	





****** Looking into the age (mean: 19.71)

clonevar birth_year = y5_doby
recode birth_year (-88/-44 = .)

gen age = 2015 - birth_year


lab var age Age 

fre age





******* Immigration status 

gen immig = 1 if y1_generationG == 14 													// majority population
replace immig = 0 if y1_generationG >=1 & y1_generationG <14							// with migration background

lab var immig "Population Background"
lab def immig 0 "Migration Background" 1 "Majority Population"
lab val immig immig
fre immig















********************************************************************************

** 							Dependent Variables 

********************************************************************************



*********** 1st: Unconventional Political Participation


** Participation in demonstration
clonevar part_dem = y5_polb5 
recode part_dem (-88/-44 = .) (2 = 0)

lab def part_dem 0 "No" 1 "Yes"
lab val part_dem part_dem
fre part_dem



** Participation in petition/signature collection 
clonevar part_pet = y5_polb4 
recode part_pet (-88/-44 = .) (2 = 0)

lab def part_pet 0 "No" 1 "Yes"
lab val part_pet part_pet
fre part_pet



** Supported a party campaign 
clonevar sup_camp = y5_polb6
recode sup_camp (-88/-44 = .) (2 = 0)

lab def sup_camp 0 "No" 1 "Yes"
lab val sup_camp sup_camp
fre sup_camp



**** Now: Index for unconventional political participation 


*** Factor analysis (see Table 4 of supplementary material)
polychoric part_dem part_pet sup_camp

display r(sum_w)

global N = r(sum_w)

matrix r = r(R)
factormat r, n($N) factors(1)          /* Not ideal; we still support an index because of theoretical reasons */



gen unc_part = part_dem + part_pet + sup_camp

lab var unc_part "Unconventional Political Participation - Index"
lab def unc_part 0 "No unconventional political participation" 3 "Highest unconventional political participation"
lab val unc_part unc_part

fre unc_part














*********** 2nd: Unconventional Political Participation (voting)


** Voting yes/no 
clonevar voting = y5_party 
recode voting (-88/-44 = .) (-99 = 0) (1/8 = 1)

lab var voting "Voting in next federal election"
lab def voting 0 "No - would not vote" 1 "Yes - would vote"
lab val voting voting
fre voting



clonevar con_part = voting 

lab var con_part "Conventional Political Participation - Voting"
fre con_part



















********************************************************************************

** 							Independent Variables 

********************************************************************************



*********** Starting with resources 


** Parental household income (from wave 1, as parents are only available in wave 1)
clonevar p_income = p1_hhinc 
recode p_income (-99/-44 = .)

mean p_income
replace p_income = 4.82 if missing(p_income)        /* As there would be a lot of missing values, we decided to replace them with the mean values. This is clearly not an ideal version and is a limitation */

lab var p_income "Parental monthly household income"
fre p_income




** Education of young adults (from wave 1)
clonevar education = schtype_geRV 
recode education (1 2 = 1) (3 = 2) (4 = 3) (5 = 4) (6 = .)

lab var education "School track attending/finished"
lab def education 1 "Lower vocational sec. school" 2 "Higher vocational sec. school" 3 "Comprehensive school" 4 "Upper sec. school"
lab val education education
fre education









*********** Now: psychological involvement



** Political interest (from wave 3)
clonevar pol_int = y3_cintsc1 							
recode pol_int (-88 = .)
vreverse pol_int, gen(pol_int2)

drop pol_int
rename pol_int2 pol_int

lab var pol_int "Political interest: Germany"
fre pol_int











*********** Now: recruitment networks


**Version 1: Involvement in clubs or groups with an index

foreach i in 2 3 4 5 6 7 8 {
	recode y5_club2a`i' (-55/-44 = .)
}


** Factor analysis (see Table 4 of supplementary material)
polychoric y5_club2a2 y5_club2a3 y5_club2a4 y5_club2a5 y5_club2a6 y5_club2a7 y5_club2a8

display r(sum_w)

global N = r(sum_w)

matrix r = r(R)
factormat r, n($N) factors(1) 				/* Again not ideal. However, for theoretical reasons, we keep the index. */




gen rec_network = y5_club2a2 + y5_club2a3 + y5_club2a4 + y5_club2a5 + y5_club2a6 + y5_club2a7 + y5_club2a8

lab var rec_network "Number involvement clubs/groups (Index) "
lab def rec_network 0 "No clubs/groups" 5 "5 clubs/groups"
lab val rec_network rec_network
fre rec_network






**Version 2: Number of German friends

clonevar ger_friends = y5_bgfr5
recode ger_friends (-88/-44 = .)
vreverse ger_friends, gen(ger_friends2)

drop ger_friends
rename ger_friends2 ger_friends

lab var ger_friends "Number German friends"
fre ger_friends
















********************************************************************************

** 							Moderating Variables 

********************************************************************************



******** 1st: National Identification Germany


**National identification 
clonevar nat_ident = y5_idsc 
recode nat_ident (-88/-44 = .)
vreverse nat_ident, gen(nat_ident2)

drop nat_ident
rename nat_ident2 nat_ident

lab var nat_ident "National identification: Germany"

fre nat_ident








******** 2nd: Discrimination

**Discrimination experiences with an index (only available from wave 3)
foreach i in 1 2 3 4 {
	recode y3_pdisc`i' (-88 = .)
	vreverse y3_pdisc`i', gen(disc`i')
}

fre disc*


*** Factor analysis (see Table 4 of supplementary material)
polychoric disc*

display r(sum_w)

global N = r(sum_w)

matrix r = r(R)
factormat r, n($N) factors(1) 



egen discrimi = rowmean (disc*)

lab var discrimi "Discrimination Index"
lab def discrimi 1 "Never" 4 "Always"
lab val discrimi discrimi
fre discrimi
























********************************************************************************

** 							Control Variables 

********************************************************************************



**********Language Skills 

*Language test (higher values mean better speaking, writing etc. German; from wave 1)
clonevar language_test = y1_lat_sum

lab var language_test "Language test"
fre language_test




**Gender
clonevar men = y5_sex
recode men (-88/-44 = .) (2 = 0)

lab var men "Men"
lab def men 0 "Female" 1 "Male"
lab val men men
fre men




**Left-Right self-assessment
clonevar left_right = y5_lrscale 
recode left_right (-99/-44 = .)

lab var left_right "Left-Right self-placement"
fre left_right





**Religion (here: importance of religion; in our opinion better capture of religious affiliation)
clonevar reli = y5_rel2
recode reli (-88/-44 = .)
vreverse reli, gen(reli2)

drop reli
rename reli2 reli 

lab var reli "Religion: importance"
fre reli




**Age
fre age



































********************************************************************************

** 							Empirical Analyses

********************************************************************************







*** Descriptives of all variables; see Table 3 of supplementary material (unweighted; with full sample)

tab education, gen(education_)

* For majority generation
asdoc sum unc_part con_part education_* p_income pol_int rec_network ger_friends nat_ident discrimi language_test men left_right reli age if immig==1, dec(2)


* For immigrants
asdoc sum unc_part con_part education_* p_income pol_int rec_network ger_friends nat_ident discrimi language_test men left_right reli age if immig==0, dec(2)
















********************************************************************************

* 				Main Regression Analyses of the article

********************************************************************************


** Keep observations constant
drop if missing(unc_part, con_part, education, p_income, pol_int, rec_network, ger_friends, nat_ident, discrimi, language_test, men, left_right, reli, age, immig, wgtadj3s)





******** Influence of standard explanations outlined in the CVM-Model (see Table 5 of supplementary material)

**** With a migration background (Immigrants)
reg unc_part ib1.education c.p_income c.pol_int c.rec_network c.ger_friends c.language_test i.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store reg_unc_I


reg con_part ib1.education c.p_income c.pol_int c.rec_network c.ger_friends c.language_test i.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store reg_con_I



**** Without a migration background (Majority Population)
reg unc_part ib1.education c.p_income c.pol_int c.rec_network c.ger_friends c.language_test i.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store reg_unc_M


reg con_part ib1.education c.p_income c.pol_int c.rec_network c.ger_friends c.language_test i.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store reg_con_M





** Now: Table 5 of supplementary material

esttab reg_unc_M reg_unc_I reg_con_M reg_con_I using Regression1.rtf, replace /// 
	title("Table 3: Impact of CVM-aspects on unconventional & conventional political participation") ///
    mtitle("Majority Population" "Migration Background" "Majority Population" "Migration Background") ///
	nonum nogaps obslast par label ///
    b(2) se(2) nonotes align(l)  ///
	stats(N r2_a, label("Observations" "Adj. R²")) ///
	order(*.education p_income pol_int rec_network ger_friends language_test *.men left_right reli age) ///
  addnotes("Notes: Linear Regressions;" ///
	  "Standard errors in parentheses; level of significance: *:p<.05, **:p<.01, ***:p<.001;" ///
	  "Source: own results; Data Source: CILS4EU-DE") ///
    varwidth(30) modelwidth(8)


















******* Influence of moderating impact: discrimination (see Table 1 in the article)

**** With a migration background (Immigrants)
** Unconventional political participation
reg unc_part ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store uncF_D_I


**** With a migration background (Immigrants)
** Conventional political participation
reg con_part ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store conF_D_I







**** Without a migration background (Majority Population)
** Unconventional political participation
reg unc_part ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store uncF_D_M


**** Without a migration background (Majority Population)
** Coonventional political participation
reg con_part ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store conF_D_M





** Now: Table 1 of the article

esttab uncF_D_M uncF_D_I conF_D_M conF_D_I using Regression2.rtf, replace /// 
	title("Table 1: Moderating impact of discrimination on unconventional & conventional political participation") ///
    mtitle("Majority Population" "Migration Background" "Majority Population" "Migration Background") ///
	nonum nogaps obslast par label interaction("*") ///
    b(2) se(2) nonotes align(l)  ///
	stats(N r2_a, label("Observations" "Adj. R²")) ///
	order(*.education p_income pol_int rec_network ger_friends discrimi *.education#c.discrimi *.p_income#c.discrimi *.pol_int#*c.discrimi *.rec_network#*c.discrimi *.ger_friends#c.discrimi language_test *.men left_right reli age) ///
  addnotes("Notes: Linear Regressions;" ///
	  "Standard errors in parentheses; level of significance: *:p<.05, **:p<.01, ***:p<.001;" ///
	  "Source: own results; Data Source: CILS4EU-DE") ///
    varwidth(30) modelwidth(8)	

	
	






********************Average marginal effects for significant interactions (see Figure 1 of the article)

**** With a migration background (Immigrants)
quietly reg unc_part ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
margins, dydx(ger_friends) at(discrimi= (1(.25)3)) vsquish saving(model1, replace)


**** Without a migration background (Majority Population)
quietly reg unc_part ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
margins, dydx(ger_friends) at(discrimi= (1(.25)3)) vsquish saving(model2, replace)
		 
		  
		  
		  
** Now: Figure 1 of the article		  
		  
combomarginsplot model1 model2, /// lists the different models 
labels("Migration Background" "Majority Population") /// specifies the labels we want in the legend 
legend(size(vsmall) region(col(white)))  /// 
title("", size(vsmall)) ///
ytitle("AME of number of German friends", size(vsmall)) ///
xtitle("Discrimination index", size(vsmall)) /// 
yline(0, lcolor(black)) ///
plot1opts(lpattern("--") msymbol(none) lwidth(thick)) ///
ci1opts(recast(rline) lpattern("--")) ///
plot2opts(lpattern(line) msymbol(none) lwidt(thick)) ///
ci2opts(recast(rline)) ///
ylab(-1.5(.5)1.5, angle(0) nogrid labsize(vsmall)) ///
xlab(, angle(45) labsize(vsmall)) ///
graphregion(color(white)) 

















******* Influence of moderating impact: national identification (see Table 2 in the article)

**** With a migration background (Immigrants)
** Unconventional political participation 
reg unc_part ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test i.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store uncF_N_I


**** With a migration background (Immigrants)
** Conventional political participation
reg con_part ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test i.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store conF_N_I







**** Without a migration background (Majority Population)
** Unconventional political participation 
reg unc_part ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test i.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store uncF_N_M


**** Without a migration background (Majority Population)
** Conventional political participation
reg con_part ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test i.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store conF_N_M







** Now: Table 2 of the article

esttab uncF_N_M uncF_N_I conF_N_M conF_N_I using Regression3.rtf, replace /// 
	title("Table 2: Moderating impact of national identification on unconventional & conventional political participation") ///
    mtitle("Majority Population" "Migration Background" "Majority Population" "Migration Background") ///
	nonum nogaps obslast par label interaction("*") ///
    b(2) se(2) nonotes align(l)  ///
	stats(N r2_a, label("Observations" "Adj. R²")) ///
	order(*.education p_income pol_int rec_network ger_friends nat_ident *.education#c.nat_ident *.p_income#c.nat_ident *.pol_int#*c.nat_ident *.rec_network#*c.nat_ident *.ger_friends#c.nat_ident language_test *.men left_right reli age) ///
  addnotes("Notes: Linear Regressions;" ///
	  "Standard errors in parentheses; level of significance: *:p<.05, **:p<.01, ***:p<.001;" ///
	  "Source: own results; Data Source: CILS4EU-DE") ///
    varwidth(30) modelwidth(8)	



		  
		  
		  

		  
		  
********************Average marginal effects for significant interactions (see Figures 2 and 3 of the article)

**** With a migration background (Immigrants)
** Unconventional political participation 
quietly reg unc_part ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test i.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
margins, dydx(pol_int) at(nat_ident= (1(1)4)) vsquish saving(model3, replace)	
margins, dydx(rec_network) at(nat_ident= (1(1)4)) vsquish saving(model5, replace)	  
		  
	
	

**** Without a migration background (Majority Population)
** Unconventional political participation 
quietly reg unc_part ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test i.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
margins, dydx(pol_int) at(nat_ident= (1(1)4)) vsquish saving(model4, replace)
margins, dydx(rec_network) at(nat_ident= (1(1)4)) vsquish saving(model6, replace)			  
		  
		

		
		


**For political interest (Figure 2 of the article)

combomarginsplot model3 model4, /// lists the different models 
labels("Migration Background" "Majority Population") /// specifies the labels we want in the legend
legend(size(vsmall) region(col(white))) ///
title("") ///
ytitle("AME of political interest", size(vsmall)) ///
xtitle("National identification", size(vsmall)) /// 
yline(0, lcolor(black)) ///
plot1opts(lpattern("--") msymbol(none) lwidth(thick)) ///
ci1opts(recast(rline) lpattern("--")) ///
plot2opts(lpattern(line) msymbol(none) lwidt(thick)) ///
ci2opts(recast(rline)) ///
ylab(-1.5(.5)1.5, angle(0) nogrid labsize(vsmall)) ///
xlab(, angle(45) labsize(vsmall) nogrid) ///
graphregion(color(white)) 
		
		
		
		
**For recruitment network (Figure 3 of the article)

combomarginsplot model5 model6, /// lists the different models 
labels("Migration Background" "Majority Population") /// specifies the labels we want in the legend
legend(size(vsmall) region(col(white))) ///
title("") ///
ytitle("AME of recruitment network", size(vsmall)) ///
xtitle("National identification", size(vsmall)) /// 
yline(0, lcolor(black)) ///
plot1opts(lpattern("--") msymbol(none) lwidth(thick)) ///
ci1opts(recast(rline) lpattern("--")) ///
plot2opts(lpattern(line) msymbol(none) lwidt(thick)) ///
ci2opts(recast(rline)) ///
ylab(-1.5(.5)1.5, angle(0) nogrid labsize(vsmall)) ///
xlab(, angle(45) labsize(vsmall) nogrid) ///
graphregion(color(white)) 		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		

		  
		  
********************************************************************************

* 		Robustness Checks & Additional Analyses (for supplementary material)

********************************************************************************		  
		  
		  
		  	  
		  
		  
******Robustness Check with logistic regressions and conventional participation (see Table 6 of the supplementary material)

	  
***** Moderating impact: discrimination 

**** With a migration background (Immigrants)
logit con_part ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [pweight = wgtadj3s] if immig==0
est store conF_D_I_L



**** Without a migration background (Majority Population)
logit con_part ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [pweight = wgtadj3s] if immig==1
est store conF_D_M_L		  


		  
		  

		  
**** Moderating impact: national identification 

**** With a migration background (Immigrants)
logit con_part ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test i.men c.left_right c.reli c.age [pweight = wgtadj3s] if immig==0
est store conF_N_I_L


**** Without a migration background (Majority Population)
logit con_part ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test i.men c.left_right c.reli c.age [pweight = wgtadj3s] if immig==1
est store conF_N_M_L	 		  
		  
		  
		  		  
		  
		  
** Now: Table 6 of supplementary material

esttab conF_D_M_L conF_D_I_L conF_N_M_L conF_N_I_L using Regression4.rtf, replace /// 
	title("Table 6: Moderating impact of discrimination & national identification on conventional political participation - logistic regressions (robustness check)") ///
    mtitle("Majority Population" "Migration Background" "Majority Population" "Migration Background") ///
	nonum nogaps obslast par label interaction("*") ///
    b(2) se(2) nonotes align(l)  ///
	stats(N r2_p, label("Observations" "Pseudo-R²")) ///
	order(*.education p_income pol_int rec_network ger_friends discrimi *.education#c.discrimi *.p_income#c.discrimi *.pol_int#*c.discrimi *.rec_network#*c.discrimi *.ger_friends#c.discrimi nat_ident *.education#c.nat_ident *.p_income#c.nat_ident *.pol_int#*c.nat_ident *.rec_network#*c.nat_ident *.ger_friends#c.nat_ident language_test *.men left_right reli age) ///
  addnotes("Notes: Logistic Regressions;" ///
	  "Standard errors in parentheses; level of significance: *:p<.05, **:p<.01, ***:p<.001;" ///
	  "Source: own results; Data Source: CILS4EU-DE") ///
    varwidth(30) modelwidth(8)		  
		  
		  
	  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
******Robustness Checks with each item for unconventional political participation*************************		  
		  
		  
		  
******** Participation in demonstration and moderating impact discrimination 

**** With a migration background (Immigrants)
reg part_dem ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store demF_D_I



**** Without a migration background (Majority Population)
reg part_dem ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store demF_D_M	
		  
		  
		  	  
		  			  
		  
		  
		  
		  
********** Participation in demonstration and moderating impact national identification 

**** With a migration background (Immigrants)
reg part_dem ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store demF_N_I


**** Without a migration background (Majority Population)
reg part_dem ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store demF_N_M	
		  
		  
		  
		  
		  
** Now: Table 7 of supplementary material
		  
esttab demF_D_M demF_D_I demF_N_M demF_N_I using Regression5.rtf, replace /// 
	title("Table 7: Moderating impact of discrimination & national identification on participation in demonstrations (robustness check)") ///
    mtitle("Majority Population" "Migration Background" "Majority Population" "Migration Background") ///
	nonum nogaps obslast par label interaction("*") ///
    b(2) se(2) nonotes align(l)  ///
	stats(N r2_a, label("Observations" "Adj. R²")) ///
	order(*.education p_income pol_int rec_network ger_friends discrimi *.education#c.discrimi *.p_income#c.discrimi *.pol_int#*c.discrimi *.rec_network#*c.discrimi *.ger_friends#c.discrimi nat_ident *.education#c.nat_ident *.p_income#c.nat_ident *.pol_int#*c.nat_ident *.rec_network#*c.nat_ident *.ger_friends#c.nat_ident language_test *.men left_right reli age) ///
  addnotes("Notes: Linear Regressions;" ///
	  "Standard errors in parentheses; level of significance: *:p<.05, **:p<.01, ***:p<.001;" ///
	  "Source: own results; Data Source: CILS4EU-DE") ///
    varwidth(30) modelwidth(8)		  
		  		  
		  
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
********* Participation in petition/signature collection and moderating impact discrimination 

**** With a migration background (Immigrants)
reg part_pet ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store petF_D_I




**** Without a migration background (Majority Population)
reg part_pet ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store petF_D_M	
		  
		

		
		
		
******** Participation in petition/signature collection and moderating impact national identification 		

**** With a migration background (Immigrants)
reg part_pet ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store petF_N_I




**** Without a migration background (Majority Population)
reg part_pet ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store petF_N_M	
		  
		
		
		
		  
** Now: Table 8 of supplementary material
		  
esttab petF_D_M petF_D_I petF_N_M petF_N_I using Regression6.rtf, replace /// 
	title("Table 8: Moderating impact of discrimination & national identification on participation in petition/signatures (robustness check)") ///
    mtitle("Majority Population" "Migration Background" "Majority Population" "Migration Background") ///
	nonum nogaps obslast par label interaction("*") ///
    b(2) se(2) nonotes align(l)  ///
	stats(N r2_a, label("Observations" "Adj. R²")) ///
	order(*.education p_income pol_int rec_network ger_friends discrimi *.education#c.discrimi *.p_income#c.discrimi *.pol_int#*c.discrimi *.rec_network#*c.discrimi *.ger_friends#c.discrimi nat_ident *.education#c.nat_ident *.p_income#c.nat_ident *.pol_int#*c.nat_ident *.rec_network#*c.nat_ident *.ger_friends#c.nat_ident language_test *.men left_right reli age) ///
  addnotes("Notes: Linear Regressions;" ///
	  "Standard errors in parentheses; level of significance: *:p<.05, **:p<.01, ***:p<.001;" ///
	  "Source: own results; Data Source: CILS4EU-DE") ///
    varwidth(30) modelwidth(8)			
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
******************* Participation in party campaign and moderating impact discrimination 		

***** With a migration background (Immigrants)
reg sup_camp ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store campF_D_I



**** Without a migration background (Majority Population)
reg sup_camp ib1.education##c.discrimi c.p_income##c.discrimi c.pol_int##c.discrimi c.rec_network##c.discrimi c.ger_friends##c.discrimi c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store campF_D_M	
		  
		  
		
		
		
		
		
		
**************** Participation in party campaign and moderating impact national identification

**** With a migration background (Immigrants)
reg sup_camp ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==0
est store campF_N_I




**** Without a migration background (Majority Population)
reg sup_camp ib1.education##c.nat_ident c.p_income##c.nat_ident c.pol_int##c.nat_ident c.rec_network##c.nat_ident c.ger_friends##c.nat_ident c.language_test ib0.men c.left_right c.reli c.age [aweight = wgtadj3s] if immig==1
est store campF_N_M	
		  
	
	
	
	
** Now: Table 9 of the suplementary material 
		  
esttab campF_D_M campF_D_I campF_N_M campF_N_I using Regression7.rtf, replace /// 
	title("Table 9: Moderating impact of discrimination & national identification on supporting party campaign (robustness check)") ///
    mtitle("Majority Population" "Migration Background" "Majority Population" "Migration Background") ///
	nonum nogaps obslast par label interaction("*") ///
    b(2) se(2) nonotes align(l)  ///
	stats(N r2_a, label("Observations" "Adj. R²")) ///
	order(*.education p_income pol_int rec_network ger_friends discrimi *.education#c.discrimi *.p_income#c.discrimi *.pol_int#*c.discrimi *.rec_network#*c.discrimi *.ger_friends#c.discrimi nat_ident *.education#c.nat_ident *.p_income#c.nat_ident *.pol_int#*c.nat_ident *.rec_network#*c.nat_ident *.ger_friends#c.nat_ident language_test *.men left_right reli age) ///
  addnotes("Notes: Linear Regressions;" ///
	  "Standard errors in parentheses; level of significance: *:p<.05, **:p<.01, ***:p<.001;" ///
	  "Source: own results; Data Source: CILS4EU-DE") ///
    varwidth(30) modelwidth(8)			
		